package com.lagou.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: EmailClient
 * @Auther: Jerry
 * @Date: 2020/10/22 16:35
 * @Desctiption: EmailClient接口
 * @Version: 1.0
 */
@FeignClient(value = "lagou-service-email", fallback = EmailFallback.class)
public interface EmailClient {

    /**
     * 发送验证码到邮箱，true成功，false失败
     * @param email 电子邮件
     * @param code 代码
     * @return {@link Boolean}
     */
    @RequestMapping("/email/{email}/{code}")
    Boolean sendToEmail(@PathVariable("email") String email, @PathVariable("code") String code);
}
